cmake_minimum_required(VERSION 3.22)
project(RocksDBDemo)

set(CMAKE_BUILD_TYPE Debug)
set(CMAKE_CXX_STANDARD 17) # 修正：设置C++标准为17

# 包含RocksDB头文件
include_directories("/usr/local/rocksdb/include") # 修正：引号括起来

include_directories("./")

# 添加可执行文件
# add_executable(RocksDBDemo main.cpp)
add_executable(
    RocksDBDemo     
    main.cpp
    # rocksdb_wrapper.cpp
)

# 链接RocksDB库
# 假设RocksDB已经安装在/usr/local/rocksdb/lib目录下，并且库文件名为librocksdb.so
find_library(ROCKSDB_LIB rocksdb /usr/local/rocksdb/lib) # 寻找库文件
target_link_libraries(RocksDBDemo ${ROCKSDB_LIB}) # 链接库